<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CryptoAuthLib: atca_helpers.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CryptoAuthLib
   </div>
   <div id="projectbrief">Microchip CryptoAuthentication Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00311.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">atca_helpers.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Helpers to support the CryptoAuthLib Basic API methods.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;stdio.h&gt;</code><br />
<code>#include &lt;ctype.h&gt;</code><br />
<code>#include &quot;<a class="el" href="a00359_source.html">cryptoauthlib.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="a00314_source.html">atca_helpers.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a42f1518aca295fab198d042b18fef075"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#a42f1518aca295fab198d042b18fef075">B64_IS_EQUAL</a>&#160;&#160;&#160;(uint8_t)64</td></tr>
<tr class="separator:a42f1518aca295fab198d042b18fef075"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd4bf9cd40bc547cd53e2ef325a1c8d0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#abd4bf9cd40bc547cd53e2ef325a1c8d0">B64_IS_INVALID</a>&#160;&#160;&#160;(uint8_t)0xFF</td></tr>
<tr class="separator:abd4bf9cd40bc547cd53e2ef325a1c8d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ae31a9fd8e9deca79aa5fef0292fe5272"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#ae31a9fd8e9deca79aa5fef0292fe5272">atcab_bin2hex</a> (const uint8_t *bin, size_t bin_size, char *hex, size_t *hex_size)</td></tr>
<tr class="memdesc:ae31a9fd8e9deca79aa5fef0292fe5272"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a binary buffer to a hex string for easy reading.  <a href="#ae31a9fd8e9deca79aa5fef0292fe5272">More...</a><br /></td></tr>
<tr class="separator:ae31a9fd8e9deca79aa5fef0292fe5272"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7371f490659b6fd68739d2b1fee50696"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#a7371f490659b6fd68739d2b1fee50696">atcab_reversal</a> (const uint8_t *bin, size_t bin_size, uint8_t *dest, size_t *dest_size)</td></tr>
<tr class="memdesc:a7371f490659b6fd68739d2b1fee50696"><td class="mdescLeft">&#160;</td><td class="mdescRight">To reverse the input data.  <a href="#a7371f490659b6fd68739d2b1fee50696">More...</a><br /></td></tr>
<tr class="separator:a7371f490659b6fd68739d2b1fee50696"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40b70cfab865fa4fd9a5e7a29ca59d38"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#a40b70cfab865fa4fd9a5e7a29ca59d38">atcab_bin2hex_</a> (const uint8_t *bin, size_t bin_size, char *hex, size_t *hex_size, bool is_pretty, bool is_space, bool is_upper)</td></tr>
<tr class="memdesc:a40b70cfab865fa4fd9a5e7a29ca59d38"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function that converts a binary buffer to a hex string suitable for easy reading.  <a href="#a40b70cfab865fa4fd9a5e7a29ca59d38">More...</a><br /></td></tr>
<tr class="separator:a40b70cfab865fa4fd9a5e7a29ca59d38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ef30ca351b13623043917b5ed86cbb8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#a4ef30ca351b13623043917b5ed86cbb8">atcab_hex2bin_</a> (const char *hex, size_t hex_size, uint8_t *bin, size_t *bin_size, bool is_space)</td></tr>
<tr class="separator:a4ef30ca351b13623043917b5ed86cbb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a208f8ddb742fced503a75ccd97911643"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#a208f8ddb742fced503a75ccd97911643">atcab_hex2bin</a> (const char *hex, size_t hex_size, uint8_t *bin, size_t *bin_size)</td></tr>
<tr class="memdesc:a208f8ddb742fced503a75ccd97911643"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function that converts a hex string to binary buffer.  <a href="#a208f8ddb742fced503a75ccd97911643">More...</a><br /></td></tr>
<tr class="separator:a208f8ddb742fced503a75ccd97911643"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a929bf65cbc777bab7e533a2755cfad"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#a7a929bf65cbc777bab7e533a2755cfad">isDigit</a> (char c)</td></tr>
<tr class="memdesc:a7a929bf65cbc777bab7e533a2755cfad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks to see if a character is an ASCII representation of a digit ((c ge '0') and (c le '9'))  <a href="#a7a929bf65cbc777bab7e533a2755cfad">More...</a><br /></td></tr>
<tr class="separator:a7a929bf65cbc777bab7e533a2755cfad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3db1b55b966b792e8308a1819933c0e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#ab3db1b55b966b792e8308a1819933c0e">isWhiteSpace</a> (char c)</td></tr>
<tr class="memdesc:ab3db1b55b966b792e8308a1819933c0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks to see if a character is whitespace.  <a href="#ab3db1b55b966b792e8308a1819933c0e">More...</a><br /></td></tr>
<tr class="separator:ab3db1b55b966b792e8308a1819933c0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a592c23e94097ad5e212beb6390aa88c6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#a592c23e94097ad5e212beb6390aa88c6">isAlpha</a> (char c)</td></tr>
<tr class="memdesc:a592c23e94097ad5e212beb6390aa88c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks to see if a character is an ASCII representation of hex ((c &gt;= 'A') and (c &lt;= 'F')) || ((c &gt;= 'a') and (c &lt;= 'f'))  <a href="#a592c23e94097ad5e212beb6390aa88c6">More...</a><br /></td></tr>
<tr class="separator:a592c23e94097ad5e212beb6390aa88c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78abefc293c0a04d8ef649c94c8a1057"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#a78abefc293c0a04d8ef649c94c8a1057">isHexAlpha</a> (char c)</td></tr>
<tr class="memdesc:a78abefc293c0a04d8ef649c94c8a1057"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks to see if a character is an ASCII representation of hex ((c &gt;= 'A') and (c &lt;= 'F')) || ((c &gt;= 'a') and (c &lt;= 'f'))  <a href="#a78abefc293c0a04d8ef649c94c8a1057">More...</a><br /></td></tr>
<tr class="separator:a78abefc293c0a04d8ef649c94c8a1057"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7ca9ee391118aafe6f3cf7df4fa5de3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#ab7ca9ee391118aafe6f3cf7df4fa5de3">isHex</a> (char c)</td></tr>
<tr class="memdesc:ab7ca9ee391118aafe6f3cf7df4fa5de3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if this character is a valid hex character or if this is whitespace (The character can be included in a valid hexstring).  <a href="#ab7ca9ee391118aafe6f3cf7df4fa5de3">More...</a><br /></td></tr>
<tr class="separator:ab7ca9ee391118aafe6f3cf7df4fa5de3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39003da4dc8a0b8999f1325c2f96f641"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#a39003da4dc8a0b8999f1325c2f96f641">isHexDigit</a> (char c)</td></tr>
<tr class="memdesc:a39003da4dc8a0b8999f1325c2f96f641"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if this character is a valid hex character.  <a href="#a39003da4dc8a0b8999f1325c2f96f641">More...</a><br /></td></tr>
<tr class="separator:a39003da4dc8a0b8999f1325c2f96f641"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad017ae33af5a7ea062cea7d54de675a8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#ad017ae33af5a7ea062cea7d54de675a8">packHex</a> (const char *ascii_hex, size_t ascii_hex_len, char *packed_hex, size_t *packed_len)</td></tr>
<tr class="memdesc:ad017ae33af5a7ea062cea7d54de675a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove white space from a ASCII hex string.  <a href="#ad017ae33af5a7ea062cea7d54de675a8">More...</a><br /></td></tr>
<tr class="separator:ad017ae33af5a7ea062cea7d54de675a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac873a37c53fdd922d5b36efd737e3ec3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#ac873a37c53fdd922d5b36efd737e3ec3">isBase64</a> (char c, const uint8_t *rules)</td></tr>
<tr class="memdesc:ac873a37c53fdd922d5b36efd737e3ec3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if this character is a valid base 64 character or if this is whitespace (A character can be included in a valid base 64 string).  <a href="#ac873a37c53fdd922d5b36efd737e3ec3">More...</a><br /></td></tr>
<tr class="separator:ac873a37c53fdd922d5b36efd737e3ec3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad10d15454308230fbef54bdd43001ed2"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#ad10d15454308230fbef54bdd43001ed2">isBase64Digit</a> (char c, const uint8_t *rules)</td></tr>
<tr class="memdesc:ad10d15454308230fbef54bdd43001ed2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if this character is a valid base 64 character.  <a href="#ad10d15454308230fbef54bdd43001ed2">More...</a><br /></td></tr>
<tr class="separator:ad10d15454308230fbef54bdd43001ed2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a175f401662f82c1e2ef822a9e1fd0b57"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#a175f401662f82c1e2ef822a9e1fd0b57">base64Index</a> (char c, const uint8_t *rules)</td></tr>
<tr class="memdesc:a175f401662f82c1e2ef822a9e1fd0b57"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the base 64 index of the given character.  <a href="#a175f401662f82c1e2ef822a9e1fd0b57">More...</a><br /></td></tr>
<tr class="separator:a175f401662f82c1e2ef822a9e1fd0b57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cf48d232ffbc9000c4d8547120f8b2d"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#a3cf48d232ffbc9000c4d8547120f8b2d">base64Char</a> (uint8_t id, const uint8_t *rules)</td></tr>
<tr class="memdesc:a3cf48d232ffbc9000c4d8547120f8b2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the base 64 character of the given index.  <a href="#a3cf48d232ffbc9000c4d8547120f8b2d">More...</a><br /></td></tr>
<tr class="separator:a3cf48d232ffbc9000c4d8547120f8b2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55ba8a1787f69d44d6e40db041fbd786"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#a55ba8a1787f69d44d6e40db041fbd786">atcab_base64decode_</a> (const char *encoded, size_t encoded_size, uint8_t *data, size_t *data_size, const uint8_t *rules)</td></tr>
<tr class="memdesc:a55ba8a1787f69d44d6e40db041fbd786"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decode base64 string to data with ruleset option.  <a href="#a55ba8a1787f69d44d6e40db041fbd786">More...</a><br /></td></tr>
<tr class="separator:a55ba8a1787f69d44d6e40db041fbd786"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeeff0177acf29e6e7b134a14d7119d69"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#aeeff0177acf29e6e7b134a14d7119d69">atcab_base64encode_</a> (const uint8_t *data, size_t data_size, char *encoded, size_t *encoded_size, const uint8_t *rules)</td></tr>
<tr class="memdesc:aeeff0177acf29e6e7b134a14d7119d69"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode data as base64 string with ruleset option.  <a href="#aeeff0177acf29e6e7b134a14d7119d69">More...</a><br /></td></tr>
<tr class="separator:aeeff0177acf29e6e7b134a14d7119d69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3aa141525a1141f1a290e2a996da0c9c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#a3aa141525a1141f1a290e2a996da0c9c">atcab_base64encode</a> (const uint8_t *byte_array, size_t array_len, char *encoded, size_t *encoded_len)</td></tr>
<tr class="memdesc:a3aa141525a1141f1a290e2a996da0c9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode data as base64 string.  <a href="#a3aa141525a1141f1a290e2a996da0c9c">More...</a><br /></td></tr>
<tr class="separator:a3aa141525a1141f1a290e2a996da0c9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6073c5a05e0ad2e738f460e727014553"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#a6073c5a05e0ad2e738f460e727014553">atcab_base64decode</a> (const char *encoded, size_t encoded_len, uint8_t *byte_array, size_t *array_len)</td></tr>
<tr class="memdesc:a6073c5a05e0ad2e738f460e727014553"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decode base64 string to data.  <a href="#a6073c5a05e0ad2e738f460e727014553">More...</a><br /></td></tr>
<tr class="separator:a6073c5a05e0ad2e738f460e727014553"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a50731dca3906502d901f5762aa4d9e71"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#a50731dca3906502d901f5762aa4d9e71">atcab_b64rules_default</a> [4] = { '+', '/', '=', 64 }</td></tr>
<tr class="separator:a50731dca3906502d901f5762aa4d9e71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87ae4178e0a5543d5b2192f26e049bd2"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#a87ae4178e0a5543d5b2192f26e049bd2">atcab_b64rules_mime</a> [4] = { '+', '/', '=', 76 }</td></tr>
<tr class="separator:a87ae4178e0a5543d5b2192f26e049bd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1cccbbcdbcb7230cc0f8ea8a596feebe"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00311.html#a1cccbbcdbcb7230cc0f8ea8a596feebe">atcab_b64rules_urlsafe</a> [4] = { '-', '_', 0, 0 }</td></tr>
<tr class="separator:a1cccbbcdbcb7230cc0f8ea8a596feebe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Helpers to support the CryptoAuthLib Basic API methods. </p>
<dl class="section copyright"><dt>Copyright</dt><dd>(c) 2015-2018 Microchip Technology Inc. and its subsidiaries. </dd></dl>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a42f1518aca295fab198d042b18fef075"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a42f1518aca295fab198d042b18fef075">&#9670;&nbsp;</a></span>B64_IS_EQUAL</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define B64_IS_EQUAL&#160;&#160;&#160;(uint8_t)64</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="abd4bf9cd40bc547cd53e2ef325a1c8d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd4bf9cd40bc547cd53e2ef325a1c8d0">&#9670;&nbsp;</a></span>B64_IS_INVALID</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define B64_IS_INVALID&#160;&#160;&#160;(uint8_t)0xFF</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a6073c5a05e0ad2e738f460e727014553"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6073c5a05e0ad2e738f460e727014553">&#9670;&nbsp;</a></span>atcab_base64decode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> atcab_base64decode </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>encoded</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>encoded_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>byte_array</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>array_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decode base64 string to data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">encoded</td><td>Base64 string to be decoded. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">encoded_len</td><td>Size of the base64 string in bytes. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">byte_array</td><td>Decoded data will be returned here. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">array_len</td><td>As input, the size of the byte_array buffer. As output, the length of the decoded data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ATCA_SUCCESS on success, otherwise an error code. </dd></dl>

</div>
</div>
<a id="a55ba8a1787f69d44d6e40db041fbd786"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a55ba8a1787f69d44d6e40db041fbd786">&#9670;&nbsp;</a></span>atcab_base64decode_()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> atcab_base64decode_ </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>encoded</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>encoded_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>data_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>rules</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decode base64 string to data with ruleset option. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">encoded</td><td>Base64 string to be decoded. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">encoded_size</td><td>Size of the base64 string in bytes. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">data</td><td>Decoded data will be returned here. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">data_size</td><td>As input, the size of the byte_array buffer. As output, the length of the decoded data. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rules</td><td>base64 ruleset to use </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a3aa141525a1141f1a290e2a996da0c9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3aa141525a1141f1a290e2a996da0c9c">&#9670;&nbsp;</a></span>atcab_base64encode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> atcab_base64encode </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>byte_array</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>array_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>encoded</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>encoded_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Encode data as base64 string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">byte_array</td><td>Data to be encode in base64. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">array_len</td><td>Size of byte_array in bytes. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">encoded</td><td>Base64 output is returned here. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">encoded_len</td><td>As input, the size of the encoded buffer. As output, the length of the encoded base64 character string.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ATCA_SUCCESS on success, otherwise an error code. </dd></dl>

</div>
</div>
<a id="aeeff0177acf29e6e7b134a14d7119d69"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeeff0177acf29e6e7b134a14d7119d69">&#9670;&nbsp;</a></span>atcab_base64encode_()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> atcab_base64encode_ </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>data_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>encoded</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>encoded_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>rules</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Encode data as base64 string with ruleset option. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>The input byte array that will be converted to base 64 encoded characters </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data_size</td><td>The length of the byte array </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">encoded</td><td>The output converted to base 64 encoded characters. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">encoded_size</td><td>Input: The size of the encoded buffer, Output: The length of the encoded base 64 character string </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rules</td><td>ruleset to use during encoding </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ae31a9fd8e9deca79aa5fef0292fe5272"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae31a9fd8e9deca79aa5fef0292fe5272">&#9670;&nbsp;</a></span>atcab_bin2hex()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> atcab_bin2hex </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>bin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>bin_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>hex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>hex_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a binary buffer to a hex string for easy reading. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">bin</td><td>Input data to convert. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bin_size</td><td>Size of data to convert. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">hex</td><td>Buffer that receives hex string. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">hex_size</td><td>As input, the size of the hex buffer. As output, the size of the output hex. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ATCA_SUCCESS on success, otherwise an error code. </dd></dl>

</div>
</div>
<a id="a40b70cfab865fa4fd9a5e7a29ca59d38"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40b70cfab865fa4fd9a5e7a29ca59d38">&#9670;&nbsp;</a></span>atcab_bin2hex_()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> atcab_bin2hex_ </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>bin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>bin_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>hex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>hex_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>is_pretty</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>is_space</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>is_upper</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function that converts a binary buffer to a hex string suitable for easy reading. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">bin</td><td>Input data to convert. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bin_size</td><td>Size of data to convert. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">hex</td><td>Buffer that receives hex string. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">hex_size</td><td>As input, the size of the hex buffer. As output, the size of the output hex. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">is_pretty</td><td>Indicates whether new lines should be added for pretty printing. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">is_space</td><td>Convert the output hex with space between it. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">is_upper</td><td>Convert the output hex to upper case.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ATCA_SUCCESS on success, otherwise an error code. </dd></dl>

</div>
</div>
<a id="a208f8ddb742fced503a75ccd97911643"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a208f8ddb742fced503a75ccd97911643">&#9670;&nbsp;</a></span>atcab_hex2bin()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> atcab_hex2bin </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>hex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>hex_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>bin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>bin_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function that converts a hex string to binary buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">hex</td><td>Input buffer to convert </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">hex_size</td><td>Length of buffer to convert </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">bin</td><td>Buffer that receives binary </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">bin_size</td><td>As input, the size of the bin buffer. As output, the size of the bin data. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ATCA_SUCCESS on success, otherwise an error code. </dd></dl>

</div>
</div>
<a id="a4ef30ca351b13623043917b5ed86cbb8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ef30ca351b13623043917b5ed86cbb8">&#9670;&nbsp;</a></span>atcab_hex2bin_()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> atcab_hex2bin_ </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>hex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>hex_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>bin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>bin_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>is_space</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a7371f490659b6fd68739d2b1fee50696"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7371f490659b6fd68739d2b1fee50696">&#9670;&nbsp;</a></span>atcab_reversal()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> atcab_reversal </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>bin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>bin_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>dest_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>To reverse the input data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">bin</td><td>Input data to reverse. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bin_size</td><td>Size of data to reverse. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">dest</td><td>Buffer to store reversed binary data. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dest_size</td><td>The size of the dest buffer.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ATCA_SUCCESS on success, otherwise an error code. </dd></dl>

</div>
</div>
<a id="a3cf48d232ffbc9000c4d8547120f8b2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3cf48d232ffbc9000c4d8547120f8b2d">&#9670;&nbsp;</a></span>base64Char()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char base64Char </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>rules</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the base 64 character of the given index. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>index to check </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rules</td><td>base64 ruleset to use </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the base 64 character of the given index </dd></dl>

</div>
</div>
<a id="a175f401662f82c1e2ef822a9e1fd0b57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a175f401662f82c1e2ef822a9e1fd0b57">&#9670;&nbsp;</a></span>base64Index()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t base64Index </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>rules</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the base 64 index of the given character. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">c</td><td>character to check </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rules</td><td>base64 ruleset to use </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the base 64 index of the given character </dd></dl>

</div>
</div>
<a id="a592c23e94097ad5e212beb6390aa88c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a592c23e94097ad5e212beb6390aa88c6">&#9670;&nbsp;</a></span>isAlpha()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool isAlpha </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Checks to see if a character is an ASCII representation of hex ((c &gt;= 'A') and (c &lt;= 'F')) || ((c &gt;= 'a') and (c &lt;= 'f')) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">c</td><td>character to check </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the character is a hex </dd></dl>

</div>
</div>
<a id="ac873a37c53fdd922d5b36efd737e3ec3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac873a37c53fdd922d5b36efd737e3ec3">&#9670;&nbsp;</a></span>isBase64()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool isBase64 </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>rules</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns true if this character is a valid base 64 character or if this is whitespace (A character can be included in a valid base 64 string). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">c</td><td>character to check </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rules</td><td>base64 ruleset to use </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the character can be included in a valid base 64 string </dd></dl>

</div>
</div>
<a id="ad10d15454308230fbef54bdd43001ed2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad10d15454308230fbef54bdd43001ed2">&#9670;&nbsp;</a></span>isBase64Digit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool isBase64Digit </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>rules</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns true if this character is a valid base 64 character. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">c</td><td>character to check </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rules</td><td>base64 ruleset to use </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the character can be included in a valid base 64 string </dd></dl>

</div>
</div>
<a id="a7a929bf65cbc777bab7e533a2755cfad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a929bf65cbc777bab7e533a2755cfad">&#9670;&nbsp;</a></span>isDigit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool isDigit </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Checks to see if a character is an ASCII representation of a digit ((c ge '0') and (c le '9')) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">c</td><td>character to check </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the character is a digit </dd></dl>

</div>
</div>
<a id="ab7ca9ee391118aafe6f3cf7df4fa5de3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab7ca9ee391118aafe6f3cf7df4fa5de3">&#9670;&nbsp;</a></span>isHex()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool isHex </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns true if this character is a valid hex character or if this is whitespace (The character can be included in a valid hexstring). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">c</td><td>character to check </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the character can be included in a valid hexstring </dd></dl>

</div>
</div>
<a id="a78abefc293c0a04d8ef649c94c8a1057"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78abefc293c0a04d8ef649c94c8a1057">&#9670;&nbsp;</a></span>isHexAlpha()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool isHexAlpha </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Checks to see if a character is an ASCII representation of hex ((c &gt;= 'A') and (c &lt;= 'F')) || ((c &gt;= 'a') and (c &lt;= 'f')) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">c</td><td>character to check </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the character is a hex </dd></dl>

</div>
</div>
<a id="a39003da4dc8a0b8999f1325c2f96f641"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a39003da4dc8a0b8999f1325c2f96f641">&#9670;&nbsp;</a></span>isHexDigit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool isHexDigit </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns true if this character is a valid hex character. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">c</td><td>character to check </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the character can be included in a valid hexstring </dd></dl>

</div>
</div>
<a id="ab3db1b55b966b792e8308a1819933c0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab3db1b55b966b792e8308a1819933c0e">&#9670;&nbsp;</a></span>isWhiteSpace()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool isWhiteSpace </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Checks to see if a character is whitespace. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">c</td><td>character to check </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the character is whitespace </dd></dl>

</div>
</div>
<a id="ad017ae33af5a7ea062cea7d54de675a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad017ae33af5a7ea062cea7d54de675a8">&#9670;&nbsp;</a></span>packHex()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> packHex </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>ascii_hex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ascii_hex_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>packed_hex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>packed_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Remove white space from a ASCII hex string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ascii_hex</td><td>Initial hex string to remove white space from </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ascii_hex_len</td><td>Length of the initial hex string </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">packed_hex</td><td>Resulting hex string without white space </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">packed_len</td><td>In: Size to packed_hex buffer Out: Number of bytes in the packed hex string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ATCA_SUCCESS on success, otherwise an error code. </dd></dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a50731dca3906502d901f5762aa4d9e71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a50731dca3906502d901f5762aa4d9e71">&#9670;&nbsp;</a></span>atcab_b64rules_default</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t atcab_b64rules_default[4] = { '+', '/', '=', 64 }</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a87ae4178e0a5543d5b2192f26e049bd2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a87ae4178e0a5543d5b2192f26e049bd2">&#9670;&nbsp;</a></span>atcab_b64rules_mime</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t atcab_b64rules_mime[4] = { '+', '/', '=', 76 }</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a1cccbbcdbcb7230cc0f8ea8a596feebe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1cccbbcdbcb7230cc0f8ea8a596feebe">&#9670;&nbsp;</a></span>atcab_b64rules_urlsafe</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t atcab_b64rules_urlsafe[4] = { '-', '_', 0, 0 }</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_97aefd0d527b934f1d99a682da8fe6a9.html">lib</a></li><li class="navelem"><a class="el" href="dir_f987fb6e7cf85d8e48d70ffe78b3ebc1.html">basic</a></li><li class="navelem"><a class="el" href="a00311.html">atca_helpers.c</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
